<?php 
/**
 * 沈阳校园微信导航----地图展示界面
 * @author zsl
 * @com   沈阳微拓科技有限公司
 */

 function getData($machine) {
	$data = array();
	$x = 0;
	$y = 0;
	if(empty($machine)) {
		$machine = "0358511020493759";
	}
	
	$mem = new Memcached();
	$mem -> addServer("localhost", 11211);
	//global $mem;
	$gets = $mem->get($machine);
	$get_data = json_decode($gets);
	//print_r($get_data);
	$data['x'] = $get_data->longitude;
	$data['y'] = $get_data->latitude;
	return json_encode($data);
	
 }
 
 
 
 echo(getData($_GET['num']));
 //echo("{\"x\":1,\"y\":123}");

 
?>

